Optimal. Leaf size=34 \[ \frac {x}{a^2}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {\tan (c+d x)}{a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3973, 3858,
3855, 3852, 8} \begin {gather*} \frac {\tan (c+d x)}{a^2 d}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {x}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3858
Rule 3973
Rubi steps
\begin {align*} \int \frac {\tan ^4(c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\frac {\int (-a+a \sec (c+d x))^2 \, dx}{a^4}\\ &=\frac {x}{a^2}+\frac {\int \sec ^2(c+d x) \, dx}{a^2}-\frac {2 \int \sec (c+d x) \, dx}{a^2}\\ &=\frac {x}{a^2}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}-\frac {\text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a^2 d}\\ &=\frac {x}{a^2}-\frac {2 \tanh ^{-1}(\sin (c+d x))}{a^2 d}+\frac {\tan (c+d x)}{a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(177\) vs. \(2(34)=68\).
time = 0.56, size = 177, normalized size = 5.21 \begin {gather*} \frac {4 \cos ^4\left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (d x+2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )}{a^2 d (1+\sec (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(79\) vs.
\(2(34)=68\).
time = 0.09, size = 80, normalized size = 2.35
method | result | size |
risch | \(\frac {x}{a^{2}}+\frac {2 i}{d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a^{2} d}\) | \(71\) |
derivativedivides | \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}\) | \(80\) |
default | \(\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}\) | \(80\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs.
\(2 (34) = 68\).
time = 0.49, size = 123, normalized size = 3.62 \begin {gather*} \frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {\sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.83, size = 66, normalized size = 1.94 \begin {gather*} \frac {d x \cos \left (d x + c\right ) - \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) + \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + \sin \left (d x + c\right )}{a^{2} d \cos \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 79 vs.
\(2 (34) = 68\).
time = 1.13, size = 79, normalized size = 2.32 \begin {gather*} \frac {\frac {d x + c}{a^{2}} - \frac {2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} + \frac {2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} - \frac {2 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{2}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.19, size = 61, normalized size = 1.79 \begin {gather*} \frac {x}{a^2}-\frac {4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________